﻿using System;
using System.Collections.Generic;
using System.Formats.Asn1;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StarryEdge.Core.Device
{
    public interface IPLC<T> : IDeviceInteraction<T>
    {
        bool Write(T address, IEnumerable<object> value);
        bool Write(T[] address, List<object> value);

        IEnumerable<TValue> Read<TValue>(T address, int length = 3);
        IEnumerable<object> Read(T[] address, int length = 3);
        IEnumerable<TClass> Read<TClass>(T[] address, int length = 3);

        TClass? ReadClass<TClass>(T address, TClass obj = default, int count = 3) where TClass : class;
    }
}
